﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;


namespace GJLib.inernal
{
    public class ClazzChecker
    {
        public bool init(String checkName,object[] param)
        {
            var ms = this.GetType().GetMembers(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance
            | System.Reflection.BindingFlags.NonPublic);
            foreach (var m in ms)
            {
                if (m.MemberType == System.Reflection.MemberTypes.Method)
                {
                    var mi = m as System.Reflection.MethodInfo;
                    String n=mi.Name;
                    System.Diagnostics.Debug.WriteLine(n);
                    if (n.Equals("check_" + checkName + "課") || n.Equals("check_" + checkName))
                    {
                        return (bool) mi.Invoke(this,param);
                    }
                }
                }
            return false;
        }

        public bool checkClazz(String clazzName,BigSixNinePan pan69)
        {
            return init(clazzName, new object[]{pan69});              

        }

        public bool check_亨通課(BigSixNinePan pan69)
        {
            System.Diagnostics.Debug.WriteLine("check_亨通課 invoke");
            return true;
        }

    }
}
